//
//  SQMessageViewController.m
//  energy
//
//  Created by 苏青 on 2021/7/27.
//

#import "SQMessageViewController.h"

#import "SQMessageModel.h"

@interface SQMessageViewController ()<BaseTableVCInterface>

@end

@implementation SQMessageViewController

- (void)viewDidLoad {
    self.tableViewInterface = self;
    [super viewDidLoad];
    self.navigationItem.title = @"消息通知";
    
    [self getMessageData];
    self.tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
        [self getMessageData];
    }];
}


-(void)getMessageData{
    [SQMessageModel getDataWithParams:@{@"m_id":UID} WithCallBack:^(SQMessageModel * data) {
        
            [self detailModelwithArr:data.data withCallBack:nil];
            [self reloadTableView];
    }];

}

-(BaseModel *)modelForCell:(NSIndexPath *)indexPath{
    return self.dataSouece[indexPath.row];
}



-(NSInteger)rowsCount:(NSInteger)section{
    return self.dataSouece.count;
}


- (NSArray<NSArray<NSString *> *> *)classArr{
    return @[@[@"SQMessageTableViewCell"]];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
